<?php
/**
* エラーチェッククラス
**/
require_once( '../system/Class_M_DAO.php' );
class Class_M_MATRIX_MST extends Class_M_DAO {
	//protected properties begin
	/**
	 *
	 * テーブル名
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	protected $_table  = "M_MATRIX_MST";
	
	/**
	 *
	 * 主キー名
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	protected $_pkey   = "id";
	
	/**
	 *
	 * ソート順
	 *
	 * @access    protected
	 * @var       string
	 *
	 */
	 protected $_order = "cd";
	 
	 protected $_cols  = array(
		"cd"   => array(AOKI_VARTYPE_STR),
		"sort" => array(AOKI_VARTYPE_STR),
		"name" => array(AOKI_VARTYPE_STR),
		"memo" => array(AOKI_VARTYPE_STR),
	 );
	
	 protected $_checks  = array(
		"cd"       => array( "EXIST" ),
		"sort"     => array( "EXIST" )
	 );
	 
	 //maxlength 
	 protected $_maxlens  = array(
		"cd"        => 10 ,
		"name"      => 50 
	 );
	
	 public function search($where ,&$page = NULL ){	
	 	
		$sql = "SELECT a.*,(select  user_name FROM M_LOGIN where id  = a.u_user) as m_user_name from {$this->_table}  a ";
		return  parent::search($where ,$page ,$sql);
	}
	
}

?>